<template>
  <Row type="flex" justify="center" align="middle">
    <Col>
      <Card shadow style="width:580px;margin-top:30%;">
          <p slot="title" style="text-align:center">
              {{userCode}}，欢迎使用云科谷核心管理系统2.0
          </p>
          <div style="text-align:center">
              <span>上次登录IP：</span><span>{{lastLoginIp}}</span>
              <span style="margin-left:10px;">上次登录时间：</span><span>{{lastLoginTime}}</span>
          </div>
      </Card>
    </Col>
  </Row>

</template>

<script>
export default {
  data () {
    return {
      userCode: null,
      lastLoginIp: null,
      lastLoginTime: null
    }
  },
  created () {
    this.userCode = sessionStorage['userCode']
    this.lastLoginIp = sessionStorage['lastLoginIp']
    this.lastLoginTime = sessionStorage['lastLoginTime']
    if (!this.lastLoginIp) {
      this.lastLoginIp = ''
    }
    if (!this.lastLoginTime) {
      this.lastLoginIp = ''
    }
  }
}
</script>
